<% layout("/common/layout.html",{"title":"实施清单"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>实施清单</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li>实施清单</li>
        </ol>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="row">

        <form id="searchForm">
            <div class="ibox-content m-b-sm border-bottom">
                <div class="row">

                    <div class="col-sm-5">
                        <div class="form-group">
                            <label class="control-label" for="search">实施清单：</label>
                            <input type="text" class="form-control" id="search" name="search" placeholder="支持事项名称、事项编码、基本编码的模糊查询">
                        </div>
                    </div>


                    <div class="col-sm-4">
                        <div class="form-group">
                            <label class="control-label" for="search">&nbsp;</label>
                            <div class="btn-block text-right">
                                <button type="button" id="search-btn" class="btn btn-primary "><i class="fa fa-search"></i>&nbsp;搜 索&nbsp;</button>
                                <button type="reset" id="reset" class="btn btn-danger"><i class="fa fa-undo"></i>&nbsp;重 置&nbsp;</button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </form>

        <div class=" animated fadeInDown">
            <div class="mail-box">
                <div class="ibox-content">
                    <table id="dataList"></table>
                    <div class="toolBar pull-left">
                        <div class="btn-group">
                            <a href="/implementation/save" class="btn btn-primary btn-outline "><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;添加</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['implement/implement'], function (implement) {
        implement.index();
    });
    //列表参数
    function operateFormatter(value, row, index) {
        var tempCode = "";
        if (row.status === "Y"){
            tempCode += '<button type="button" class="status btn btn-default btn-white"><i class="fa fa-toggle-off"></i>&nbsp;禁用&nbsp;</button>';
        }else{
            tempCode += '<button type="button" class="status btn btn-default btn-white"><i class="fa fa-toggle-on"></i>&nbsp;启用&nbsp;</button>';
        }
        <% if(shiro.hasPermission("/implementation/save/action")){ %>
            tempCode += '<button type="button" class="update btn btn-white btn-xs">&nbsp;<i class="fa fa-pencil"></i>&nbsp;编辑&nbsp;</button>';
        <% } %>
        <% if(shiro.hasPermission("/implementation/view/index")){ %>
            tempCode += '<button type="button" class="info btn btn-white btn-xs">&nbsp;<i class="fa fa-files-o"></i>&nbsp;预览&nbsp;</button>';
        <% } %>
        <% if(shiro.hasPermission("/implementation/delete/action")){ %>
            tempCode += '<button type="button" class="delete btn btn-white btn-xs">&nbsp;<i class="fa fa-trash"></i>&nbsp;删除&nbsp;</button>';
        <% } %>
        tempCode += '<a href="/implementation/view/time/'+row.unid+'" class="btn btn-white btn-outline ">&nbsp;<i class="fa fa-file"></i>&nbsp;资料列表&nbsp;</button>';
        return '<div class="btn-group btn-group-xs">' + tempCode + '</div>';
    }

</script>